package com.wzcl.app.dao.repository;

import com.wzcl.app.dao.model.ActivitySinglePromotion;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface ActivitySinglePromotionRepository extends JpaRepository<ActivitySinglePromotion,Integer>, JpaSpecificationExecutor<ActivitySinglePromotion> {

    List<ActivitySinglePromotion> findAllByActivityIdOrderByOrderNoDesc(Integer activityId);

    void deleteAllByActivityId(Integer activityId);
}
